#ifndef LLMBASE_H
#define LLMBASE_H

#include <string>
#include <functional>
#include <curl/curl.h>

#include <iostream>

class LlmBase {
public:
    LlmBase() {
        curl = curl_easy_init();
        if (!curl) {
            std::cerr << "Failed to initialize CURL" << std::endl;
        }
    }

    virtual ~LlmBase() {
        if (curl) {
            curl_easy_cleanup(curl);
        }
    }

    virtual bool postRequest(const std::string& question) = 0;

    bool is_post_finished() const {
        return is_post_done;
    }

protected:

    bool is_post_done = false;

    CURL* curl;
};

#endif // LLMBASE_H
